<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:margin="http://www.w3.org/1999/xhtml">
<html>
<head>
	<title>Details</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="Motel Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
	<script type="applijewelleryion/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
	<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
	<link th:href="@{/css/buttons.css}" rel='stylesheet' type='text/css' />
	<link href="order/css/bootstrap1.css" rel='stylesheet' type='text/css' /><!-- bootstrap css -->
	<link href="order/css/style1.css" rel='stylesheet' type='text/css' /><!-- custom css -->
	<link href="order/css/font-awesome.min.css" rel="stylesheet"><!-- fontawesome css -->
	<!-- Custom Theme files -->
	<link href="css/style.css" rel='stylesheet' type='text/css' />
	<script src="js/jquery-1.11.1.min.js"></script>
	<!--webfonts-->
	<link href='http://fonts.useso.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
	<link href='http://fonts.useso.com/css?family=Open+Sans:400,300italic,300,600' rel='stylesheet' type='text/css'>
	<!--//webfonts-->
	<script type="text/javascript" src="js/bootstrap.js"></script>
	<script type="text/javascript" src="js/addRooms.js"></script>
	<script type="text/javascript">

        function submitt() {
        	if (document.getElementById("p").value=="电话号码"||document.getElementById("p").value=="")
        		alert("请输入电话号码")
			else {
				var obj = document.getElementById("adults"); //定位id
			if(obj.options[obj.selectedIndex].text=="房间数")
				alert("请选择房间数")
				else {
				var obj = document.getElementById("kids"); //定位id
				if(obj.options[obj.selectedIndex].text=="成人")
					alert("请选择成人数")
				else {
					var t = $("#order").serialize();
					$.ajax({
						//几个参数需要注意一下
						type: "POST",//方法类型
						dataType: "json",//预期服务器返回的数据类型
						url: "/detailss" ,//url
						data: t,
						success: function (result) {
							console.log(result);//打印服务端返回的数据(调试用)
							if (result.resultCode == 200) {
								window.location.href="/contact"
							}
							;
						},
						error : function() {
							window.location.href="/contact"
						}
					});
				}

			}


			}



        }



        function checkForm() {
            if(document.getElementById("rooms").value()=="房间数量"||document.getElementById("kids").value()=="3岁小孩免费，最高限住5人"){
                alert("信息不完善");
                return false;
            }
        }
		var date = new Date();
		var month=date .getMonth()+1;
		var DAY;
		if (date .getDate()<10)
			DAY="0"+date .getDate();
		else
			DAY=date.getDate();
		var DATE=month+"/"+DAY+"/"+date .getFullYear();

		function submits() {
			var text1=document.getElementById("param").value;
			var text2=document.getElementById("datepicker").value;
			var text3=document.getElementById("datepicker1").value;


			if(text1!=""){
				if (text2!="预计入住时间"&&text2!="")//||
					if (text3!="预计离店时间"&&text3!=""){//||
						if (text2<DATE||text2>=text3)
							alert("请确认日期是否正确")
						else {
							var from1data = $("#SearchText").serialize();
							var from2data = $("#In").serialize();
							var from3data = $("#Out").serialize();
							var data=from1data+'&'+from2data+'&'+from3data;///////
							$.ajax({
								//几个参数需要注意一下
								type: "POST",//方法类型
								dataType: "json",//预期服务器返回的数据类型
								url: "/index2" ,//url
								data: data,
								success: function (result) {
									console.log(result);//打印服务端返回的数据(调试用)
									if (result.resultCode == 200) {
										window.location.href="/index2"
									}
									;
								},
								error : function() {
									window.location.href="/select"
								}
							});
						}

					}else {
						alert("请选择预计离店时间");
					}
				else {
					alert("请选择预计入住时间");
				}

			}else
			{ alert("请输入酒店、城市或品牌等关键字"); }

		}

	</script>
</head>
<body
>
<!-- banner -->
<div th:replace="~{include/search::search}">

</div>
<!-- banner -->
<!-- details -->



<div class="details" th:each="room:${photo2}">
<!--	<form action="/details" method="post">-->
	<div class="container">
		<div class="col-md-7 details-left">
			<img th:src="|${photo2}|" class="img-responsive" alt="" width="600" height="600">
		</div>
		<div class="col-md-5 details-right">
			<h3 th:text="|${hotel.hotelTranslatedName}(${hotel.hotelName})|"></h3>

			<span>单人间：</span><span th:text="${price}"  name="price"></span>
			<h3> </h3>
			<li> 一张大床</li>
			<li> 免费WiFi</li>
			<li> 淋浴以及浴缸</li>
			<li> 基础设施齐全</li>
		</div>
		<div class="clearfix"> </div>
		<div class="details-top">
			<h4>地址</h4>
			<h6 th:text="${hotel.addressline1}">有效期：2019年1月1日至2019年12月31日</h6>
		</div>
		</div>
	</div>
<div class="details" th:each="room:${photo3}">
	<!--	<form action="/details" method="post">-->
	<div class="container">
		<div class="col-md-7 details-left">
			<img th:src="|${photo3}|" class="img-responsive" alt="" width="600" height="600">
		</div>
		<div class="col-md-5 details-right">
			<h3 th:text="|${hotel.hotelTranslatedName}(${hotel.hotelName})|"></h3>

			<span>双人间：</span><span th:text="${price}"  name="price"></span>
			<br/>
			<h3></h3>
			<li> 2张床</li>
			<li> 免费WiFi</li>
			<li> 淋浴以及浴缸</li>
			<li> 禁烟区</li>
			<li> 基础设施齐全</li>
		</div>
		<div class="clearfix"> </div>
		<div class="details-top">
			<h4>地址</h4>
			<h6 th:text="${hotel.addressline1}">有效期：2019年1月1日至2019年12月31日</h6>
		</div>
	</div>
</div>
<div class="details" th:each="room:${photo4}">
	<!--	<form action="/details" method="post">-->
	<div class="container">
		<div class="col-md-7 details-left">
			<img th:src="|${photo4}|" class="img-responsive" alt="" width="600" height="600">
		</div>
		<div class="col-md-5 details-right">
			<h3 th:text="|${hotel.hotelTranslatedName}(${hotel.hotelName})|"></h3>

			<span>私人套房：</span><span th:text="${price}"  name="price"></span>
			<h3></h3>
			<li> 高级的商旅客房，满足您各种差旅需求。房间免费网络畅游和双线电话，让您的工作畅行无阻。智能化一键式客房系统，让您的住店更加便捷。Ipod多媒体音响，VOD高清影视点播，满足您业余时间的娱乐生活。累了？在热带雨林和高级浴缸里彻底放松自己吧</li>
		</div>
		<div class="clearfix"> </div>
		<div class="details-top">
			<h4>地址</h4>
			<h6 th:text="${hotel.addressline1}">有效期：2019年1月1日至2019年12月31日</h6>
		</div>
	</div>
</div>


<section class="contact py-55">
	<div class="container py-lg-5 py-sm-4">
		<h2 class="heading text-capitalize text-center mb-lg-5 mb-4"> 房间订购 </h2>
		<div class="contact-grids">
			<div class="row1">
				<div class="col-lg-7 contact-left-form">
					<form action="/details" method="post" class="row" id="order">
						<div class="col-sm-6 form-group contact-forms">
							<input type="text" class="form-control1" th:value="${username}" disabled="" name="username" id="username">
						</div>
						<div class="col-sm-6 form-group contact-forms">
							<input type="email" class="form-control1" th:value="${email}" disabled name="email">
						</div>
						<div class="col-sm-6 form-group contact-forms">
							<input type="text" class="form-control1" placeholder="电话号码" required="" name="phone" id="p">
						</div>
						<div class="col-sm-6 form-group contact-forms">
							<input type="text" class="form-control1" th:placeholder="${DATE}" disabled name="timed">
						</div>
						<div class="col-sm-6 form-group contact-forms">
							<select class="form-control1" id="adults" name="rooms">
								<option>房间数</option>
								<option>1</option>
								<option>2</option>
								<option>3</option>
								<option>4</option>
								<option>5或者更多</option>
							</select>
						</div>
						<div class="col-sm-6 form-group contact-forms">
							<select class="form-control1" id="kids" name="users">
								<option>成人</option>
								<option>1</option>
								<option>2</option>
								<option>3</option>
								<option>4</option>
								<option>5或者更多</option>
							</select>
						</div>
						<div class="col-md-12 form-group contact-forms">
							<textarea class="form-control1" placeholder="需求留言" rows="3" name="userRequired"></textarea>
						</div>
						<div class="col-md-12 booking-button">
							<input type="button" class="btn btn-block sent-butnn" onclick="submitt()" th:value="立即预定">
						</div>
					</form>
				</div>
				<div class="col-lg-5 contact-right pl-lg-5">

					<div class="image-tour position-relative">
						<img src="order/images/jiudian.jpg" alt="" class="img-fluid1" />
						<p><span class="fa fa-tags"></span> <span>订购享更多优惠</span></p>
					</div>

					<h4>旅行建议</h4>
					<p class="mt-31">旅行是生活中最大乐事，旅游虽然要花去不少的钱，但它给人们带来的欢乐无穷无尽。</p>

				</div>
			</div>
		</div>
	</div>
</section>
<!-- details -->
<!-- footer -->
<div class="footer">
	<div class="container">
		<div class="col-md-2 deco">
			<h4>导航</h4>
			<li><a th:href="@{/}">主页</a></li>
			<li><a th:href="@{/shortcodes.html}">短信通知</a></li>
			<li><a th:href="@{/sigin.html}">登录</a></li>
			<li><a th:href="@{/contact.html}">相关联系</a></li>
		</div>
		<div class="col-md-2 deco">
			<h4>链接</h4>
			<li><a href="#">关于我们</a></li>
			<li><a href="#">法律支持</a></li>
			<li><a href="#">用户须知</a></li>
		</div>
		<div class="col-md-2 deco">
			<h4>社交软件</h4>
			<div class="soci">
				<li><a href="#"><i class="f-1"> </i></a></li>
				<li><a href="#"><i class="t-1"> </i></a></li>
				<li><a href="#"><i class="g-1"> </i></a></li>
			</div>
		</div>
		<div class="col-md-3 cardss">
			<h4>安全支付</h4>
            <li><i class="WeChatPay"></i></li>
            <li><i class="Alipay"></i></li>
            <li><i class="UnionPay"></i></li>
			<div class="clearfix"> </div>
		</div>
		<div class="col-md-3 pos">
			<h4>实时通知</h4>
			<form method="post">
				<input type="text" class="textbox" value="E-mail" onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = 'Email';}">
				<div class="smt">
					<input type="submit" value="订阅">
				</div>
			</form>
		</div>
		<div class="clearfix"> </div>
	</div>
</div>
<div class="footer-bottom">
	<div class="container">
		<p>Copyright &copy; 2015.Company name All rights reserved.More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a>
		</p>
	</div>
</div>
<!-- footer -->
</body>
</html>